<html xmlns:th="http://www.thymeleaf.org">
<head>
	<title>All Books</title>
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
</head>
<body>
<div class="container">
	<div class="row">
		<div class="col-md-12">
			<h1> Books </h1>
		</div>
	</div>
	<div class="row">
		<div class="col-md-6">
			<table class="table">
				<thead>
					<tr>
						<th> Title </th>
						<th> Author </th>
					</tr>
				</thead>
				<tbody>
					<tr th:if="${books.empty}">
						<td colspan="2"> No Books Available </td>
					</tr>
					<tr th:each="book : ${books}">
						<td><span th:text="${book.title}"> Title </span></td>
						<td><span th:text="${book.author}"> Author </span></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="col-md-6">
			<a class="btn btn-success" href="#" th:href="@{/books/create}"> Add Books </a>
			<a class="btn btn-primary" href="#" th:href="@{/books/edit}" th:classappend="${books.empty} ? 'disabled' : ''"> Edit Books </a>
		</div>
	</div>
</div>
</body>
</html>
